import request from '../utils/request.js'
// 发送验证码
export const SendCode =(data)=> request.post("https://ucenter-api.xgimi.com/v1/identity/sendCode",data);
// 短信登录
export const LoginSMS =(data)=>request.post("https://ucenter-api.xgimi.com/v1/sso/smsLogin",data)

// 检测用户登录
export const CheckLogin = ()=>request.get("https://ucenter-api.xgimi.com/open/oauth2/login/checkLogin",{},{header:{channel:"h5",source:1}})

// 获取场馆信息
export const GetStadium = data=>request.get("https://tenant.51yundong.me/v3/stadium/api/stadiums/stadiumItems",data,{
	header:{
		Authorization: "Bearer 5a9df3318b0d3f849986fa6148bdc7a7"

	}
})

// 获取分类
export const GetCategory = ()=>request.get("https://xgimi-mall-gateway.xgimi.com/mall/product/category/list",{},{showLoading:{title:"加载中..."}})

// 获取详情
export const GetDetail = (data)=>request.get("https://xgimi-mall-gateway.xgimi.com/mall/sku/basic/info",data,{showLoading:{title:"准备中..."}})

// 加入购物
export const AddCart = (data)=>request.post("https://xgimi-mall-gateway.xgimi.com/mall/cart/add",data);

// 购物车数量
export const GetCount = ()=>request.get("https://xgimi-mall-gateway.xgimi.com/mall/cart/count");

// 获取购物车列表
export const GetCartList = ()=>request.get("https://xgimi-mall-gateway.xgimi.com/mall/cart/query",{},{showLoading:{title:"加载中..."}})

// 选择购物车
export const CheckCart = (data)=>request.post("https://xgimi-mall-gateway.xgimi.com/mall/cart/checked",data)

// 删除购物车
export const RemoveCart = data=>request.post("https://xgimi-mall-gateway.xgimi.com/mall/cart/remove",data)
// 获取确认订单信息
export const ConfirmOrder = (data)=>request.post("https://xgimi-mall-gateway.xgimi.com/mall/order/confirm",data)
// 创建订单
export const PlaceOrder = data =>request.post("https://xgimi-mall-gateway.xgimi.com/mall/order/place",data)
// 获取订单信息
export const GetOrder = data=>request.post("https://xgimi-mall-gateway.xgimi.com/payment/order/confirm",data)
// 支付宝支付接口
export const PayAli = data=>request.post("https://97fca9f2-41f6-449f-a35e-3f135d4c3875.bspapp.com/http/pay",data)